﻿using System.Xml.Serialization;

namespace Toybox.NicoSharp.RSS
{
	using Primitives;

	[XmlRoot("rss")]
	public class MylistRSS : AbstractRSSwithAtomLink
	{

		#region [Static]

		protected const string NAMESPACE_DC = @"http://purl.org/dc/elements/1.1/";

		public static MylistRSS Get(string id)
		{
			string url = NicoUrls.VideoTop + "mylist/" + id;
			return Get<MylistRSS>(url + "?" + GetQuery());
		}

		#endregion [Static]


		#region Public Members

		public Channel channel;

		#endregion Public Members


		#region [SubClass]

		public class Channel : AbstractChannel
		{
			/// <summary>
			/// AtomLink
			/// </summary>
			[XmlElement(ElementName = "link", Namespace = AtomLink.NAMESPACE)]
			public AtomLink atomlink;

			/// <summary>
			/// 日時
			/// </summary>
			public string pubDate;

			/// <summary>
			/// 生成日時
			/// </summary>
			public string lastBuildDate;

			/// <summary>
			/// RSS生成者
			/// </summary>
			public string generator;

			/// <summary>
			/// 制作者
			/// </summary>
			[XmlElement(Namespace = NAMESPACE_DC)]
			public string creator;

			public string docs;

			/// <summary>
			/// アイテム
			/// </summary>
			[XmlElement]
			public Item[] item;
		}

		#endregion [SubClass]

	}
}
